package com.hc.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hc.service.LogisticsService;
import com.hc.serviceimp.LogisticsServiceImpl;

/**
 * Servlet implementation class LogisticsServlet
 */
@WebServlet("/LogisticsServlet")


public class LogisticsServlet extends HttpServlet {
	//创建调用service层对象
	LogisticsService lService=new LogisticsServiceImpl();
    public LogisticsServlet() {
        super();
        
    }

	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String action = request.getParameter("action");
		if(action.equals("toadd")) {
			
			request.getRequestDispatcher("/WEB-INF/Logistics/add.jsp").forward(request, response);
		}
		if(action.equals("add")) {
			
			
		}
		if(action.equals("tolist")) {
			
			request.getRequestDispatcher("/WEB-INF/Logistics/select.jsp").forward(request, response);
		}
		if(action.equals("list")) {
			
			request.getRequestDispatcher("/WEB-INF/Logistics/list.jsp").forward(request, response);
		}
		if(action.equals("toupdate")) {
			
			
		}
		if(action.equals("update")) {
			
			
		}
		if(action.equals("del")) {
			
			
		}
		
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		doGet(request, response);
	}

}
